
$(function(){
	// $('.nav-img .img-back li')
	var i1 =3;

	setInterval(function(){
		if(i1==3){
			$('.nav-img .img-back li').eq(0).fadeIn(600);
			$('.nav-img .img-back li').eq(3).fadeOut(600);
			
			i1=0;
		}else{
			$('.nav-img .img-back li').eq(i1+1).fadeIn(600);
			$('.nav-img .img-back li').eq(i1).fadeOut(600);
			i1++;
		}
		
	},5000);

	$('.nav-img .img-back .i1').on('click',function(){
		if(i1==0){
			$('.nav-img .img-back li').eq(0).fadeOut(600);
			$('.nav-img .img-back li').eq(3).fadeIn(600);
			i1=3;
		}else{
			$('.nav-img .img-back li').eq(i1).fadeOut(600);
			$('.nav-img .img-back li').eq(i1-1).fadeIn(600);	
			i1=i1-1;
		}
		
	})
	$('.nav-img .img-back .i2').on('click',function(){
	
		if(i1==3){
			$('.nav-img .img-back li').eq(3).fadeOut(600);
			$('.nav-img .img-back li').eq(0).fadeIn(600);
			i1=0;
		}else{
			$('.nav-img .img-back li').eq(i1).fadeOut(600);
			$('.nav-img .img-back li').eq(i1+1).fadeIn(600);
			i1=i1+1;
		}
		
	});
	
	//点击页码实现不同列表的显示
	var page =0;
	$('.floor3 .bottom .page ul .one').on('click',function(){
		
		//点击数字时候的实现
		$('.floor3 .bottom .page ul .one').css('background','white');
		$('.floor3 .bottom .page ul .one').css('border','2px solid #eaeaea');
		$('.floor3 .bottom .page ul .one').css('color','#666');
		$(this).css('background','#0992F3');
		$(this).css('border','2px solid #0992F3');
		$(this).css('color','#fff');
		page = $(this).index()-1;
		console.log(page);
		console.log('page');
		
		
		//页面内容的转换
		$('.floor3 .bottom .bottom-con').css('display','none');
		$('.floor3 .bottom .bottom-con').eq(page).css('display','block');
		
		//阴影效果
		$('.floor3 .bottom .shadow').css('left','0');
		$('.floor3 .bottom .shadow').css('display','block');
		$('.floor3 .bottom .shadow').animate({left:1180},600,'linear');
		
	})
	//点击上下页面时候的转换
	//点击上一页
	$('.floor3 .bottom .page ul .two1').on('click',function(){
		if(page==0){
//			$('.floor3 .bottom .page ul .two1').css({'background':'#0992F3','border':'2px solid #0992F3','color':'#fff'});
		}else{
			$('.floor3 .bottom .page ul .one').css('background','white');
			$('.floor3 .bottom .page ul .one').css('border','2px solid #eaeaea');
			$('.floor3 .bottom .page ul .one').css('color','#666');
			page =page-1;
			$('.floor3 .bottom .page ul .one').eq(page).css('background','#0992F3');
			$('.floor3 .bottom .page ul .one').eq(page).css('border','2px solid #0992F3');
			$('.floor3 .bottom .page ul .one').eq(page).css('color','#fff');
			
			//阴影效果
			$('.floor3 .bottom .shadow').css('left','0');
			$('.floor3 .bottom .shadow').css('display','block');
			$('.floor3 .bottom .shadow').animate({left:1180},600,'linear');
			
//			$('.floor3 .bottom .page ul .two1').css({'background':'white','border':'2px solid #eaeaea','color':'#666'});
		}
		
		//页面内容的转换
		$('.floor3 .bottom .bottom-con').css('display','none');
		$('.floor3 .bottom .bottom-con').eq(page).css('display','block');
		
			
	})
	
	//点击下一页
	$('.floor3 .bottom .page ul .two2').on('click',function(){
		if(page==3){
			
		}else{
			$('.floor3 .bottom .page ul .one').css('background','white');
			$('.floor3 .bottom .page ul .one').css('border','2px solid #eaeaea');
			$('.floor3 .bottom .page ul .one').css('color','#666');
			page =page+1;
			$('.floor3 .bottom .page ul .one').eq(page).css('background','#0992F3');
			$('.floor3 .bottom .page ul .one').eq(page).css('border','2px solid #0992F3');
			$('.floor3 .bottom .page ul .one').eq(page).css('color','#fff');
			//阴影效果
			$('.floor3 .bottom .shadow').css('left','0');
			$('.floor3 .bottom .shadow').css('display','block');
			$('.floor3 .bottom .shadow').animate({left:1180},600,'linear');
		}
		
		//页面内容的转换
		$('.floor3 .bottom .bottom-con').css('display','none');
		$('.floor3 .bottom .bottom-con').eq(page).css('display','block');
		
			
	})

	//四楼信息的JS
	$('.floor4 .bottom .title .sp1').on('mouseenter',function(){
		$('.floor4 .bottom .title span').css('background','#f6f6f6');
		$(this).css('background','#eaeaea');
		$('.floor4 .bottom .row2').css('display','block');
		$('.floor4 .bottom .row1').css('display','none');
	})
	$('.floor4 .bottom .title .sp2').on('mouseenter',function(){
		$('.floor4 .bottom .title span').css('background','#f6f6f6');
		$(this).css('background','#eaeaea');
		$('.floor4 .bottom .row1').css('display','block');
		$('.floor4 .bottom .row2').css('display','none');
	})
	
	//5楼右边的鼠标滑过出现对应的信息
//	$('.floor5 .right .top ul li').on('mouseenter',function(){
//		var src= $(this).find('img').text();
//		console.log(src);
//		$(this).find('.shadow').css('display','block');
//		
//		$(this).find('.shadow .one img').attr('src','')
//	})

//五楼产品信息随计时器出现商品
	var top_num=0;
	setInterval(function(){
		$('.floor5 .right .bottom .scroll .qustion').animate({top:top_num},1000,'linear');
		top_num=top_num-120;
		if(top_num==-840){
			top_num=0;
			$('.floor5 .right .bottom .scroll .qustion').animate({top:top_num},1,'linear');
		}
	},3000)
	//头像信息根据不同位置出现在不同位置
	var touxiang =1;
	for(var i=1;i<100;i++){
		var j ;
		if(i%5==0){
			j=i-1;
			$('.floor5 .right .top li').eq(j).find('.shadow').css('left','-220px');
			$('.floor5 .right .top li').eq(j-1).find('.shadow').css('left','-220px');
			$('.floor5 .right .top li').eq(j-2).find('.shadow').css('left','-220px');
			$('.floor5 .right .top li').eq(j-3).find('.shadow').css('left','-20px');
		}
	}






	//angular数据的监听
	var app = angular.module('myApp',[]);
		app.controller('myCtrl',function($scope){
			$scope.arr =[
				{'name':'团长','img':'01_avatar_middle.jpg','title':'一包之遥HiSmart首款智能背包 ','content':'HiSmart可以通过App和蓝颜模块实现精准定位、录音、遥控自拍、双向防丢、接听电话'},
				{'name':'漠漠睡','img':'61_avatar_middle.jpg','title':'2016易观A10数据创新峰会将在京举办 ','content':'腾客9月30日电 2016易观A10数据创新峰会将于10月27-28日在京举办，最为创新的数据'},
				{'name':'漠漠睡','img':'61_avatar_middle.jpg','title':'第十四期CSHIA智能家居工程师培训12月 ','content':'为了更好地推动智能家居区域市场的建设，提高智能家居集成商的技术水平和业务能力，中'},
				{'name':'潮智世界','img':'69_avatar_middle.jpg','title':'如何正确看待智能手环的运动监测作用？','content':'我们在网上经常能看到这样一些信息，关于智能手环如何帮助人们监测健康，达到良好'}
			];
			//floor3的商品信息
			//页面一的内容
			$scope.arr1=[
			{'img1':'a5c3d8a1b40752761365ad5c8a2c6fc1.jpg','img2':'50_avatar_middle.jpg','title':'麻雀虽小，五脏俱全-Newifi Mini 路由器初','look':'466','time':'2016-04-19'},
			{'img1':'88bec8ae10dd9a1a97b5f8367bcc7c27.jpg','img2':'31_avatar_middle.jpg','title':'99元1200兆双频无线路由器上手体验','look':'6173','time':'2016-04-14'},
			{'img1':'51858c0852237d39aadfa0298288d94d.jpg','img2':'31_avatar_middle.jpg','title':'ORICO 双盘位移动硬盘座试用评测','look':'6344','time':'2016-03-30'},
			{'img1':'3c63d075660b8d6fdbb930cda462c93d.jpg','img2':'50_avatar_middle.jpg','title':'高颜值与时尚音质并存---LKER LKS1A便携式','look':'5457','time':'2016-03-28'},
			//第二行
			{'img1':'84c4a284efbdb958692844c7802d1785.jpg','img2':'02_avatar_middle.jpg','title':'思念我的话他可以满足你，小西机器人','look':'5265','time':'2016-03-24'},
			{'img1':'003542051facaf34c47fe28d2310664a.jpg','img2':'31_avatar_middle.jpg','title':'一款为游戏而生的无线路由器 华硕RT-AC88U','look':'4662','time':'2016-03-24'},
			{'img1':'4fc0b8f7337a6902cf77683e364222f6.jpg','img2':'31_avatar_middle.jpg','title':'挑战传统插座 ORICO多功能插座重度来袭','look':'3215','time':'2016-03-18'},
			{'img1':'50a282385801c47e7de75d83c18992f6.jpg','img2':'50_avatar_middle.jpg','title':'喝出健康水---Lehoo 智能水杯（水质检测版)','look':'4057','time':'2016-03-17'},
			]
			
			//页面二的内容
			$scope.arr2=[
			{'img1':'4b06b069e957f1cd27798f77d81768f5.jpg','img2':'50_avatar_middle.jpg','title':'小身材大惊喜---APEX笔记本支架初体验','look':'466','time':'2016-04-19'},
			{'img1':'076b52ed05f83163884266ccfbce0889.jpg','img2':'31_avatar_middle.jpg','title':'高颜值四天线TOTO LIN K AC 1300M双频路 由','look':'6173','time':'2016-04-14'},
			{'img1':'fc6c974982b3e35dc56a13072483a9c3.jpg','img2':'31_avatar_middle.jpg','title':'星夜下的一抹亮---RND L03跷跷板智能灯初体','look':'6344','time':'2016-03-30'},
			{'img1':'9e7da6d2cd3ba5defa54bb103ead6b04.jpg','img2':'50_avatar_middle.jpg','title':'埃微I7智能手 环上手体验','look':'5457','time':'2016-03-28'},
			//第二行
			{'img1':'5d5cd44a3a4a3a13fb353182226e3415.jpg','img2':'02_avatar_middle.jpg','title':'智能快充一个足矣 ORI CO 4口充电器测评','look':'5265','time':'2016-03-24'},
			{'img1':'8ec06be63b6904f62a465d675261e68e.jpg','img2':'31_avatar_middle.jpg','title':'高颜值四天线TOTO LINK AC 1300M双频路 由','look':'4662','time':'2016-03-24'},
			{'img1':'fa485d2c31bfbbefc17ad64d885e1101.jpg','img2':'31_avatar_middle.jpg','title':'伏来阳移动式太阳能充电器试用体验','look':'3215','time':'2016-03-18'},
			{'img1':'94e509c708ba7446ac9c7333d484f34c.jpg','img2':'50_avatar_middle.jpg','title':'霸气外露，锋芒毕现——网件夜鹰X8 R8500上','look':'4057','time':'2016-03-17'},
			];
			
			//页面3的内容
			$scope.arr3=[
			{'img1':'53df9527c5f6b2afdabddf6f4740651b.jpg','img2':'50_avatar_middle.jpg','title':'怀揣极米，挥别北极村！——极米无屏电视Z4','look':'466','time':'2016-04-19'},
			{'img1':'c33e803344c8db31c17f1df27830e8b6.jpg','img2':'31_avatar_middle.jpg','title':'引领智能无屏电 视潮流的投影仪极 米Z4极光','look':'6173','time':'2016-04-14'},
			{'img1':'c6e741183ecd144c2335d0f4fba60c40.jpg','img2':'31_avatar_middle.jpg','title':'iWALK口袋宝应急式移动电源：即插即用 我最','look':'6344','time':'2016-03-30'},
			{'img1':'b1178de16912a8d17def20d2ef1d4413.jpg','img2':'50_avatar_middle.jpg','title':'iWALK秘书宝的充电体验跟美图鉴赏','look':'5457','time':'2016-03-28'},
			//第二行
			{'img1':'7d939fea50bae2ee1dc29d1ea972e184.jpg','img2':'02_avatar_middle.jpg','title':'狄龙智能皮带测评：智能穿戴界又一力作？','look':'5265','time':'2016-03-24'},
			{'img1':'54dd6cb290db1c1c2428e1bfa6c6e28d.jpg','img2':'31_avatar_middle.jpg','title':'小米手环1S 光感版 没有时间显示你还会买吗','look':'4662','time':'2016-03-24'},
			{'img1':'10100ee2dd18c203cbe19ecba605bf96.jpg','img2':'31_avatar_middle.jpg','title':'可穿戴与非接触的抉择——iSleep优睡宝体验','look':'3215','time':'2016-03-18'},
			{'img1':'429627fd5f03fb42b4ebdfa11baa172f.jpg','img2':'50_avatar_middle.jpg','title':'硬糖智能插座体验记','look':'4057','time':'2016-03-17'},
			];
			
			//页面4的内容
			$scope.arr4=[
			{'img1':'a5c3d8a1b40752761365ad5c8a2c6fc1.jpg','img2':'50_avatar_middle.jpg','title':'4麻雀虽小，五脏俱全-Newifi Mini 路由器初','look':'466','time':'2016-04-19'},
			{'img1':'88bec8ae10dd9a1a97b5f8367bcc7c27.jpg','img2':'31_avatar_middle.jpg','title':'99元1200兆双频无线路由器上手体验','look':'6173','time':'2016-04-14'},
			{'img1':'51858c0852237d39aadfa0298288d94d.jpg','img2':'31_avatar_middle.jpg','title':'ORICO 双盘位移动硬盘座试用评测','look':'6344','time':'2016-03-30'},
			{'img1':'3c63d075660b8d6fdbb930cda462c93d.jpg','img2':'50_avatar_middle.jpg','title':'高颜值与时尚音质并存---LKER LKS1A便携式','look':'5457','time':'2016-03-28'},
			//第二行
			{'img1':'84c4a284efbdb958692844c7802d1785.jpg','img2':'02_avatar_middle.jpg','title':'思念我的话他可以满足你，小西机器人','look':'5265','time':'2016-03-24'},
			{'img1':'003542051facaf34c47fe28d2310664a.jpg','img2':'31_avatar_middle.jpg','title':'一款为游戏而生的无线路由器 华硕RT-AC88U','look':'4662','time':'2016-03-24'},
			{'img1':'4fc0b8f7337a6902cf77683e364222f6.jpg','img2':'31_avatar_middle.jpg','title':'挑战传统插座 ORICO多功能插座重度来袭','look':'3215','time':'2016-03-18'},
			{'img1':'50a282385801c47e7de75d83c18992f6.jpg','img2':'50_avatar_middle.jpg','title':'喝出健康水---Lehoo 智能水杯（水质检测版)','look':'4057','time':'2016-03-17'},
			];
			
			
			
		})
		
		
		




})